﻿using System;
using System.Collections.Generic;
using System.Linq;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class InwardOutwardDetail : BusinessObject
    {
        public InwardOutwardDetail()
        {
            AddRule(new ValidateRequired("RefDetailID"));

            AddRule(new ValidateRequired("RefID"));

            AddRule(new ValidateRequired("StockID"));
        }

        public InwardOutwardDetail(string refDetailId, string refId, string restaurantMenuId, string inventoryItemName, string inventoryItemId, string description,
                                    string stockId, string unitId, string unitConvertId, decimal quantity, decimal quantityConvert,
                                    decimal unitPirce, decimal unitPriceConvert, decimal amount, decimal amountConvert, int outwardPurpose)
            : this()
        {
            RefDetailID = refDetailId;
            RefID = refId;
            RestaurantMenuID = restaurantMenuId;
            InventoryItemID = inventoryItemId;
            InventoryItemName = inventoryItemName;
            Description = description;
            StockID = stockId;
            UnitID=unitId;
            UnitConvertID = unitConvertId;
            Quantity = quantity;
            QuantityConvert = quantityConvert;
            UnitPrice = unitPirce;
            UnitPriceConvert = unitPriceConvert;
            Amount = amount;
            AmountConvert = amountConvert;
            OutwardPurpose = outwardPurpose;
        }

        public string RefDetailID { get; set; }

        public string RefID { get; set; }

        public string RestaurantMenuID { get; set; }

        public string InventoryItemID { get; set; }

        public string InventoryItemName { get; set; }

        public string Description { get; set; }

        public string StockID { get; set; }

        public string UnitID { get; set; }

        public string UnitConvertID { get; set; }

        public decimal Quantity { get; set; }

        public decimal QuantityConvert { get; set; }

        public decimal UnitPrice { get; set; }

        public decimal UnitPriceConvert { get; set; }

        public decimal Amount { get; set; }

        public decimal AmountConvert { get; set; }

        public int OutwardPurpose { get; set; }
    }
}
